#!/bin/bash


# resolve links - $0 may be a softlink
PRG="$0"

while [ -h "$PRG" ] ; do
       ls=`ls -ld "$PRG"`
       link=`expr "$ls" : '.*-> \(.*\)$'`
       if expr "$link" : '/.*' > /dev/null; then
               PRG="$link"
       else
               PRG=`dirname "$PRG"`/"$link"
       fi
done

PRGDIR=`dirname "$PRG"`
filename=`basename $0`

if [ $# -lt 3 ]; then
 echo "Usage: $filename \$username \$commit_since \$commit_until"
 echo "get a list of changed files filter by author and commit range"
 echo "example:"
 echo "  $filename Jacob fccb1a4 e5d1133"
 echo ""
 exit 1
fi

git log --no-merges --name-status --oneline --author $1 $2..$3 | grep -v "^\\w\{7,\} .*" | grep -v "^D" | awk '{print $2}' | awk '!x[$0]++'
